#include<iostream>
#include<string>
using namespace std;

class func{
public:
	func(){}
	~func(){}
 
	int x;
};


class func1 : public virtual func{
public:
	func1(){}
	~func1(){}
public:
	void func(){
		cout<<"func() in func1"<< x <<endl;
	}
};

class func2 : public virtual func{
public:
	func2(){}
	~func2(){}
public:
	void func(){
		cout<<"func() in func2"<< x<< endl;
	}
};

class test : public func1, public func2
{
	public: 
	test()	{}
	~test() {}

	void func(){
		cout<< "func in test" << x << endl;
	}

};

int main(){

	test a;
	a.func();
	return 0;
}